package jpm.web;

import java.util.*;
import javax.ejb.EJB;
import jpm.entity.JSR;
import jpm.entity.Platform;
import jpm.entity.Package;
import jpm.session.JavaPlatformManagerRemote;

public class JPMClient {
	@EJB private JavaPlatformManagerRemote jpm;
	public void createJavaSE () {
		jpm.createPlatform(new Platform("Java SE 5",
			new JSR(176, "Java SE 5 Release Contents",
				new Package("java.lang"), new Package("java.util"), new Package("java.sql")),
			new JSR(166, "Concurrency Utilities", new Package("java.util.concurrent"))));
	}
	public void createJavaEE () {
		jpm.createPlatform(new Platform("Java EE 5",
			new JSR(270, "Java EE 5 Release Contents"),
			new JSR(220, "EJB 3.0", new Package("javax.ejb"))));
	}
	public List<Platform> getAllPlatforms () {
		return jpm.listPlatforms();
	}
}
